import {createStore,combineReducers} from "redux";
import {counterReducer} from "./counterReducer";
import {todoReducer} from "./todoReducer";

//创建store函数
//store包含2部分：所有reducer  所有组件的state
//参数1:合并后的reducer
//参数2:state
const rootReducer = combineReducers({
  counterReducer:counterReducer,
  todoReducer:todoReducer
});

const iniitalState = {

};

const store = createStore(rootReducer,iniitalState);
export default store;